package com.egene.tw.api;

import com.egene.tw.network.ApiConstant;
import com.loopj.android.http.AsyncHttpResponseHandler;
import com.loopj.android.http.RequestParams;

import static com.egene.tw.network.ApiHttpClient.post;

/**
 * Created by albert on 2017/11/5.
 */

public class FcmTokenApi {

    private final static String API_URL = ApiConstant.API_URL;

    /**
     * 注册Fcm Token
     * @param userid
     * @param fcmToken fcm token
     */
    public static void registerFcmToken(String userid, String fcmToken, AsyncHttpResponseHandler handler){
        RequestParams params = new RequestParams();
        params.put("token", fcmToken);
        params.put("userid", userid);
        params.put("cmd", "ServerHandler.SetAndroidToken");
        post(API_URL, params, handler);
    }
}
